package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_COMMISSION_RATIO;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_DISSATISFY_MONTH;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_END_ASTRICT;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_END_ASTRICT_JSON;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_HOUR_AMOUNT;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_HOUR_AMOUNT_RULE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_LEAVE_OFFICE_RULE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_LEAVE_SHOW_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_NAME;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_RED_PACKET_RULE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_RULE_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_SALARY_CALCULATE_RULE_GROUP_ID;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_SHOW_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_SORT;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_SPECIAL_COST;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_TIME_JSON;
import static org.jsola.hr.example.SalaryCalculateRuleExample.E_TIME_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_END_ASTRICT_JSON_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_HOUR_AMOUNT_RULE_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_LEAVE_OFFICE_RULE_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_NAME_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_RED_PACKET_RULE_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_SALARY_CALCULATE_RULE_GROUP_ID_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.M_TIME_JSON_MAX;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_COMMISSION_RATIO;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_DISSATISFY_MONTH;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_END_ASTRICT;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_END_ASTRICT_JSON;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_HOUR_AMOUNT;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_HOUR_AMOUNT_RULE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_LEAVE_OFFICE_RULE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_LEAVE_SHOW_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_NAME;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_RED_PACKET_RULE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_RULE_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_SALARY_CALCULATE_RULE_GROUP_ID;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_SHOW_TYPE;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_SORT;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_SPECIAL_COST;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_TIME_JSON;
import static org.jsola.hr.example.SalaryCalculateRuleExample.N_TIME_TYPE;

/**
 * 工价计算规则
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【工价计算规则】的参数")
@Data
public class SalaryCalculateRuleUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_SALARY_CALCULATE_RULE_GROUP_ID, example = E_SALARY_CALCULATE_RULE_GROUP_ID)
    @Length(max = 32, message = M_SALARY_CALCULATE_RULE_GROUP_ID_MAX)
    private String salaryCalculateRuleGroupId;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 2147483647, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_TIME_TYPE, example = E_TIME_TYPE)
    private Integer timeType;

    @ApiModelProperty(notes = N_TIME_JSON, example = E_TIME_JSON)
    @Length(max = 2147483647, message = M_TIME_JSON_MAX)
    private String timeJson;

    @ApiModelProperty(notes = N_RULE_TYPE, example = E_RULE_TYPE)
    private Integer ruleType;

    @ApiModelProperty(notes = N_SHOW_TYPE, example = E_SHOW_TYPE)
    private Integer showType;

    @ApiModelProperty(notes = N_LEAVE_SHOW_TYPE, example = E_LEAVE_SHOW_TYPE)
    private Integer leaveShowType;

    @ApiModelProperty(notes = N_HOUR_AMOUNT, example = E_HOUR_AMOUNT)
    private Long hourAmount;

    @ApiModelProperty(notes = N_HOUR_AMOUNT, example = E_HOUR_AMOUNT)
    private Double hourAmountDouble;

    @ApiModelProperty(notes = N_HOUR_AMOUNT_RULE, example = E_HOUR_AMOUNT_RULE)
    @Length(max = 2147483647, message = M_HOUR_AMOUNT_RULE_MAX)
    private String hourAmountRule;

    @ApiModelProperty(notes = N_RED_PACKET_RULE, example = E_RED_PACKET_RULE)
    @Length(max = 2147483647, message = M_RED_PACKET_RULE_MAX)
    private String redPacketRule;

    @ApiModelProperty(notes = N_LEAVE_OFFICE_RULE, example = E_LEAVE_OFFICE_RULE)
    @Length(max = 2147483647, message = M_LEAVE_OFFICE_RULE_MAX)
    private String leaveOfficeRule;

    @ApiModelProperty(notes = N_DISSATISFY_MONTH, example = E_DISSATISFY_MONTH)
    private Integer dissatisfyMonth;

    @ApiModelProperty(notes = N_END_ASTRICT, example = E_END_ASTRICT)
    private Integer endAstrict;

    @ApiModelProperty(notes = N_END_ASTRICT_JSON, example = E_END_ASTRICT_JSON)
    @Length(max = 2147483647, message = M_END_ASTRICT_JSON_MAX)
    private String endAstrictJson;

    @ApiModelProperty(notes = N_COMMISSION_RATIO, example = E_COMMISSION_RATIO)
    private BigDecimal commissionRatio;

    @ApiModelProperty(notes = N_SPECIAL_COST, example = E_SPECIAL_COST)
    private Long specialCost;

    @ApiModelProperty(notes = N_HOUR_AMOUNT, example = E_HOUR_AMOUNT)
    private Double specialCostDouble;

    @ApiModelProperty(notes = N_SORT, example = E_SORT)
    private Integer sort;


}

